package com.smarttourism.mapper;

import com.smarttourism.domain.Roomorder;
import com.smarttourism.domain.SHX.RoomOrderStatus;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author SHX
* @description 针对表【roomOrder(订单表)】的数据库操作Mapper
* @createDate 2024-10-18 15:51:02
* @Entity com.smarttourism.domain.Roomorder
*/
@Mapper
public interface RoomorderMapper {

    int deleteByPrimaryKey(Long id);

    int insert(Roomorder record);

    int insertSelective(Roomorder record);

    Roomorder selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Roomorder record);

    int updateByPrimaryKey(Roomorder record);

    List<Roomorder> findAllRoomOrders(@Param("rname") String rname, @Param("statusId") Integer statusId);

    RoomOrderStatus selectOrderStatusById(int id);

    // 逻辑删除
    int updateDeleteOrderById(int id);

    // 修改订单状态
    // 1待支付 2已支付 3已退订 4已完成
    int updateOrderStatusById(@Param("status") int status,@Param("id") int id);



}
